package QQClient;

import java.io.DataOutputStream;
import java.io.IOException;

public class RegisterSendThread extends Thread {
	public RegisterSendThread(DataOutputStream  douts,RegisterMes rmes){
		this.douts=douts;
		this.rmes=rmes;
	}
	public void run(){
		try {
			byte[] temb_nikename=rmes.getNikename().getBytes();
			byte[] temb_psd=rmes.getPsd().getBytes();
			douts.writeInt(temb_nikename.length+temb_psd.length+17);
			douts.writeByte(0);
			douts.writeInt(10000);
			douts.writeInt(temb_nikename.length);
			douts.write(temb_nikename);
			douts.writeInt(temb_psd.length);
			douts.write(temb_psd);
			douts.flush();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		
	}
	private DataOutputStream  douts;
	private RegisterMes rmes;
}
